<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
    
    <%@page import="br.com.bean.HorarioBean"%>
<%@page import="br.com.controller.HorarioController"%>
<%@page import="br.com.connection.ConnectionFactory"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.util.List"%>

<%
	Connection conn = new ConnectionFactory().getConnection();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

				<%
					String cpf = request.getParameter("id_cpf");
				List<HorarioBean> list = HorarioController.ListHrsEsp(conn, cpf);
				conn.close();
					%>
		<table id="tabela">
				<tr>
					<th>Escola</th>
					<th>Matricula</th>
					<th>CPF</th>
					<th>Nome</th>
					<th>Horario Entrada</th>
					<th>Horario de Saida</th>
					<th>Horario Entrada</th>
					<th>Horario de Saida</th>
				</tr>
				<%
				for (int i=0; i<list.size(); i ++) {
				%>
				<tr>
					<td><%=list.get(i).getId_escola()%></td>
					<td><%=list.get(i).getMatricula()%></td>
					<td><%=list.get(i).getId_cpf().getCpf()%></td>
					<td><%=list.get(i).getId_cpf().getNome()%></td>
					<td><%=list.get(i).getEntrada1()%></td>
					<td><%=list.get(i).getSaida1()%></td>
					<td><%=list.get(i).getEntrada2()%></td>
					<td><%=list.get(i).getSaida2()%></td>
				</tr>
				<%}%>
			</table>

</body>
</html>